package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by admin on 2017/7/31.
 */

public class UserGuideApi extends BaseApi {

    ProcessListReq req;

    public UserGuideApi(String member_id , int page_num) {
        req = new ProcessListReq(member_id, page_num);
    }

    public class ProcessListReq {
        public String member_id;
        public int page_num;

        public ProcessListReq(String member_id, int page_num) {
            this.member_id = member_id;
            this.page_num = page_num;
        }
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).UserGuideList(requestBody);
    }
}
